package com.lcredu.aop.homework;

import org.springframework.stereotype.Component;

/**
 * @author 黎长容
 * @date 2025-07-15 20:06
 */
@Component
public class MyCal implements Cal {
    @Override
    public int cal1(int n) {
        int count = 1;
        for (int i = 1; i <= n; i++) {
            count += i;
        }
        return count;
    }

    @Override
    public int cal2(int n) {
        int count = 1;
        for (int i = 1; i <= n; i++) {
            count *= i;
        }
        return count;
    }
}
